{% extends "speaker_survey/base.html" %}
{% load i18n %}

{% block content %}
<div id="content-main">

{% if speaker %}
<h2>
Survey Results for {{ speaker|escape }}
</h2>

<table>
<tr>
  <td>
    <table border="1">
    <tr>
      <th>Question</th>
    </tr>
    {% for s in survey.help_text %}
    <tr>
      <td>{{ s }}</td>
    </tr>
    {% ifequal forloop.counter0 6 %}
    <tr>
      <td>Speaker score</td>
    </tr>
    {% endifequal %}
    {% ifequal forloop.counter0 14 %}
    <tr>
      <td>Presentation score</td>
    </tr>
    {% endifequal %}
    {% endfor %}
    </table>
  </td>
  <td>
    <table border="1">
    <tr>
      {% for c in choices %}
      <td>
      {{ c }}
      </td>
      {% endfor %}
      <td>Avg Score</td>
    </tr>
    {% for s in scores %}
    <tr>
      {% for ss in s %}
      <td>{{ ss }}</td>
      {% endfor %}
    </tr>
    {% ifequal forloop.counter0 6 %}
    <tr>
      <td colspan="5">&nbsp;</td>
      <td>{{ sc1 }}</td>
    </tr>
    {% endifequal %}
    {% ifequal forloop.counter0 14 %}
    <tr>
      <td colspan="5">&nbsp;</td>
      <td>{{ sc2 }}</td>
    </tr>
    {% endifequal %}
    {% endfor %}
    </table>
  </td>
  <td>
  </td>
</tr>
</table>

<p>
Number of surveys: {{ num }}<br />
Number of comments: {{ comments|length }}
</p>

<h3>Comments</h3>

<table border="1">
{% for c in comments %}
<tr><td>{{ c|striptags|fix_ampersands }}</td></tr>
{% endfor %}
</table>

{% endif %}

</div>
{% endblock %}

